package com.hm.oauth.model;

import java.util.List;

import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.common.model.BaseModel;
import com.hm.oauth.def.OauthDef;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 上午9:58:41 2016年8月30日
 * @version 1.0
 * @describe
 */
@Getter
@Setter
@Document(collection = OauthDef.DB.PREFIX + "users")
public class UserModel extends BaseModel {

	private static final long serialVersionUID = 1L;

	private String name;

	private String password;

	private String email;

	private String phone;

	/**
	 * 加密密码的盐
	 */
	private String salt;
	
	private String note;

	@Field("head_portrait")
	private String headPortrait;

	private List<ExtensionNature> natures;

	@Setter
	@Getter
	public static class ExtensionNature {

		private String key;

		private Object value;
	}
}
